<!DOCTYPE html>
<html>
    <head lang="zh">
        <meta http-equiv="Content-Type" content="text/html ;charset=utf-8">
        <meta name="google" content="notranslate" />
        <meta http-equiv="X-UA-COMPATIBLE" content="IE=edge"/>
        <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
        <meta name="viewport" content="width=device-width,initial-scale=1.0"/>
        <meta name="csrf-token" content="{{ csrf_token() }}">
        <link rel="shortcut icon" type="image/x-icon" href="{{URL::asset('handan/images/logo-icon.png')}}" />
        <title>EAI交易圈</title>
        <!-- css样式引入 -->
        <link rel="stylesheet" type="text/css" href="{{ URL::asset('public_css/base.css') }}" />
        <link rel="stylesheet" type="text/css" href="{{ URL::asset('fenhome/fenhomecontent.css') }}" />
        <link rel="stylesheet" href="{{ URL::asset('rankinglist/css/eject.css') }}"/>
    </head>
<body>
<!-- HTML部分 -->
@include('new.newheader')
<!-- 左侧部分 -->
<div class="j_navSide">
    <ul>
        <li class="active">
            <a href="javascript:;">
                <img src="{{ URL::asset('fenhome/image/handan.png') }}"/>
                <span>分析师策略</span>
            </a>
        </li>
        <li>
            <a href="javascript:;">
                <img src="{{ URL::asset('fenhome/image/gensui.png') }}"/>
                <span>订阅者</span>
            </a>
        </li>
        @if(session('eai')['id'] == $id)
        <li>
            <a href="javascript:;">
                 <img src="{{ URL::asset('fenhome/image/gendan.png') }}"/>
                <span>订阅记录</span>
            </a>
        </li>
        <li>
            <a href="javascript:;">
                <img src="{{ URL::asset('fenhome/image/gensuid.png') }}"/>
                <span>订阅大师</span>
            </a>
        </li>
        @endif
    </ul>
</div>
<!-- 主体部分 -->
<div class="j_main">
    <!-- 分析师头像 -->
    <div class="j_center">
        <div class="j_center_maxbox">
            <div class="j_center_top">
                <div>
                    <div class="j_pohto">
                        <img src="@if($userinfo->photo) {{$userinfo->photo}} @else {{ URL::asset('/ucenter/images/head.png') }} @endif" alt="">
                    </div>
                    <span>{{ $userinfo->username}} </span>
                    <br/>
                    <span class="j_register">注册时间：{{ $userinfo->reg_time }}</span>
                </div>
                <div>
                    <div>
                        @if($userinfo->grade == 0)
                            <img src="{{ URL::asset('/ucenter/images/0dengji.png') }}" alt="">
                        @elseif($userinfo->grade == 1)
                            <img src="{{ URL::asset('/ucenter/images/1dengji.png') }}" alt="">
                        @elseif($userinfo->grade == 2)
                            <img src="{{ URL::asset('/ucenter/images/2dengji.png') }}" alt="">
                        @elseif($userinfo->grade == 3)
                            <img src="{{ URL::asset('/ucenter/images/3dengji.png') }}" alt="">
                        @elseif($userinfo->grade == 4)
                            <img src="{{ URL::asset('/ucenter/images/4dengji.png') }}" alt="">
                        @endif
                    </div>
                    <div>
                        @if($userinfo->star == 0)
                            <img src="{{ URL::asset('/ucenter/images/start.png') }}" alt="">
                            <img src="{{ URL::asset('/ucenter/images/start.png') }}" alt="">
                            <img src="{{ URL::asset('/ucenter/images/start.png') }}" alt="">
                        @elseif($userinfo->star == 1)
                            <img src="{{ URL::asset('/ucenter/images/liang.png') }}" alt="">
                            <img src="{{ URL::asset('/ucenter/images/start.png') }}" alt="">
                            <img src="{{ URL::asset('/ucenter/images/start.png') }}" alt="">
                        @elseif($userinfo->star == 2)
                            <img src="{{ URL::asset('/ucenter/images/liang.png') }}" alt="">
                            <img src="{{ URL::asset('/ucenter/images/liang.png') }}" alt="">
                            <img src="{{ URL::asset('/ucenter/images/start.png') }}" alt="">
                        @elseif($userinfo->star == 3)
                            <img src="{{ URL::asset('/ucenter/images/liang.png') }}" alt="">
                            <img src="{{ URL::asset('/ucenter/images/liang.png') }}" alt="">
                            <img src="{{ URL::asset('/ucenter/images/liang.png') }}" alt="">
                        @endif
                    </div>
                    <br>
                    <span> @if($userinfo->grade == 0) 交易专员 @elseif($userinfo->grade == 1) 交易高手 @elseif($userinfo->grade == 2) 分析专家 @elseif($userinfo->grade == 3) 操盘大师 @elseif($userinfo->grade == 4) 金融宗师 @endif</span>
                </div>
                <div>
                    <div>
                        <span><a href="javascript:;">{{ $userinfo->liansheng }}</a>/5 </span>
                        <span>连胜</span>
                    </div>
                    <div>
                        <span><a href="javascript:;">{{ $userinfo->lianbai }}</a>/3 </span>
                        <span>连亏</span>
                    </div>
                </div>
            </div>
            <div class="j_jianjie">
                <h6>个人简介</h6>
                <div class="j_text">
                    <div class="z_content_right_two z_box_z">
                        {{$userinfo->introduction}}
                    </div>
                </div>
                <div class="j_GPS">
                    <img src="{{ URL::asset('fenhome/image/weizhi.png') }}" alt="">
                    <span>
                        @if($moreinfo != '')
                            {{ $moreinfo->province}} {{ $moreinfo->city}} {{ $moreinfo->country}}
                        @endif
                    </span>
                </div>
            </div>
        </div>
        <!-- 个人中心分析师自己看自己的 -->
        @if($userinfo->id == session('eai')['id'])

        <div class="j_leftbox">
            <ul>
                <li>
                    <div>
                        <img src="{{ URL::asset('fenhome/image/ren.png') }}" alt="" />
                    </div>
                    <div>
                        <span>{{$follownum}}人</span>
                        <span>订阅人数</span>
                    </div>
                </li>
                <li>
                    <div>
                        <img src="{{ URL::asset('ucenter/images/score.png') }}" alt="" />
                    </div>
                    <div>
                        <span>{{$userinfo->jifen}}</span>
                        <span>积分</span>
                    </div>
                </li>
            </ul>
            @if($userinfo->expire_time > time())   <!-- 如果用户已提交申请，并且没有过期，那么从当前时间开始倒计时  -->
                <script>
                    $(function(){
                        timer = setInterval("daojishi()",1000);
                    })
                </script>
                <div class="j_huiyuan">
                    <span class="j_time">**天**小时**分</span>
                    <span>会员剩余</span>
                </div>
            @else
                <div class="j_chongzhi" onclick="window.location.href='{{url('/pay')}}'">
                        充值
                </div>
            @endif
        </div>
        @else
        <!-- 别人看分析师的个人中心 -->
        <div class="j_leftbox">
            <ul>
                <li style="border-right: 1px solid #3c627b;">
                    <div>
                        <img src="{{ URL::asset('fenhome/image/ren.png') }}" alt="" />
                    </div>
                    <div>
                        <span>{{$follownum}}人</span>
                        <span>订阅人数</span>
                    </div>
                </li>
            </ul>
            <div class="j_chongzhi j_copyone" id="j_copyone">
                编辑复制
            </div>
            <div class="j_chongzhi j_copy" id="btn2" analyst_id="{{$userinfo->id}}" analyst_username="{{$userinfo->username}}" status="{{$followstatus}}" direction="{{$followdirection}}">
                复制
            </div>
        </div>
        @endif
    </div>
    <div class="L_tab_content">
        <!-- 擅长品种 -->
        <div class="j_shangchang">
            <h6>擅长品种</h6>
            @foreach($memadepttype as $key=>$val)
                <span>{{$val->chinaname}}</span>
            @endforeach
        </div>
        <div class="j_shangchang">
            <h6>交易风格</h6>
            <span><img src="{{ URL::asset('fenhome/image/leixing.png') }}" alt="">保守型</span>
            <span>
                <img src="{{ URL::asset('fenhome/image/shanchang.png') }}" alt="">
                擅长{{$likeLine}}交易
            </span>
        </div>
        <!-- 总盈 -->
        <div class="j_zongying">
            <ul>
                <li>
                    <span>总盈</span>
                    <span>{{ $allData->allPoint ? $allData->allPoint : 0 }}点</span>
                </li>
                <li>
                    <span>策略数量</span>
                    <span>{{$allData->profitTradeNum + $allData->lossTradeNum}}笔</span>
                </li>
                <li>
                    <span>胜率</span>
                    <span class="red">{{$allData->shenglv}}%</span>
                </li>
            </ul>
            <ul>
                <li>
                    <span>做多盈利</span>
                    <span>{{$allData->allBuyProfitPoint}}点</span>
                </li>
                <li>
                    <span>盈利策略</span>
                    <span class="red">{{$allData->profitTradeNum}}笔</span>
                </li>
                <li style="position: relative;" >
                    <span class="j_tuijiandingyue" style="cursor: pointer;" id="wending">稳定指数</span>
                    <b class="j_tuijian" style="position: absolute;">
                        <img src="{{ URL::asset('fenhome/image/minsanjiao.png') }}" alt="">
                        <div>
                            <p> <span>稳定指数</span>  <span>{{ $wenDing_fengXian['wenDing'] }}</span> </p>
                            <b>以0-10分计算的“稳定指数” 用于测量EAI分析师所相对应的“原始交易策略”的稳定情况的展示。分值越高，策略越稳定与可控。</b>
                        </div>
                    </b>
                    <span style="float: right;">{{ $wenDing_fengXian['wenDing'] }}</span>
                </li>
            </ul>
            <ul>
                <li>
                    <span>做空盈利</span>
                    <span>{{$allData->allSellProfitPoint}}点</span>
                </li>
                <li>
                    <span>亏损策略</span>
                    <span class="green">{{$allData->lossTradeNum}}笔</span>
                </li>
                <li>
                    <span>最大回撤</span>
                    <span class="green">{{ $maxData['huiche'] }}</span>
                </li>
            </ul>
            <ul>
                <li>
                    <span>单均盈利</span>
                    <span class="red">{{ $allData->avaProfit }}点</span>
                </li>
                <li>
                    <span>平均持仓时间</span>
                    <span>{{ $allData->avgChiCangTime }}时</span>
                </li>
                <li>
                    <span>最大涨幅</span>
                    <span class="red">{{ $maxData['zhangfu'] }}</span>
                </li>
            </ul>
            <ul>
                <li>
                    <span>单均亏损</span>
                    <span class="green">{{$allData->avaLoss}}点</span>
                </li>
                <li>
                    <span>预期回报</span>
                    <span>--</span>
                </li>
                <li style="position: relative;" >
                    <span class="fengxian" style="cursor: pointer;" id="fengxian">风报比</span>
                    <b class="j_fenxian" style="position: absolute;">
                        <img src="{{ URL::asset('fenhome/image/minsanjiao.png') }}" alt="">
                        <div>
                            <p> <span>风报比</span>  <span>{{ $wenDing_fengXian['fengXianBi'] }}</span> </p>
                            <b>“风报比”即是用于测量EAI分析师所相对应“原始交易策略”的计算综合分析。比值越高，风报越来稳定与可控。
                            </b>
                        </div>
                    </b>
                    <span style="float: right;">{{ $wenDing_fengXian['fengXianBi'] }}</span>
                </li>
            </ul>
            <ul>
                <li>
                    <span>最大连亏</span>
                    <span class="green">{{$maxData['liankui']}}笔</span>
                </li>
                <li>
                    <span>最大连胜</span>
                    <span class="red">{{ $maxData['liansheng'] }}笔</span>
                </li>
                <li>
                    <span>推荐订阅比例</span>
                    <span>
                        @if($allData->allPoint > 0)
                            1000 : 0.05
                        @else
                            1000 : 0.02
                        @endif
                    </span>
                </li>
            </ul>
        </div>
        <!-- tab切换栏 -->
        <div class="j_tab">
            <span class="active">数据总览</span>
            <span>交易行为</span>
            <span>策略详情</span>
            <span>分析师K线图</span>
        </div>
        <!-- tab切换内容 -->
        <div class="j_tabcontent" style="display: block;">
            <div class="j_tabtitle">收益曲线</div>
            <div class="j_tabecharts">
                <!-- 收益曲线图 -->
                <div class="profitChart" style="width: 100%; height: 420px;padding-top:54px;">
                    <div id="profit_chart" style="width:100%;height: 330px;"></div>
                </div>
                <!--分页数据表 -->
                <div class="j_tabzhou" id="j_tabzhou">
                    {{--<ul>--}}
                        {{--<li></li>--}}
                        {{--<li>总收益</li>--}}
                        {{--<li>收益比例</li>--}}
                        {{--<li>喊单数量</li>--}}
                    {{--</ul>--}}
                    {{--<ul>--}}
                        {{--<li>第1周</li>--}}
                        {{--<li class="red">248点</li>--}}
                        {{--<li class="red">15%</li>--}}
                        {{--<li>11单</li>--}}
                    {{--</ul>--}}
                    {{--<ul>--}}
                        {{--<li>第1周</li>--}}
                        {{--<li class="red">248点</li>--}}
                        {{--<li class="red">15%</li>--}}
                        {{--<li>11单</li>--}}
                    {{--</ul>--}}
                    {{--<br style="clear: both;">--}}
                    {{--<div class="j_tabpage">--}}
                        {{--<span>上一页</span>--}}
                        {{--<b>10</b>--}}
                        {{--<span>下一页</span>--}}
                    {{--</div>--}}
                </div>
            </div>
            <div class="j_tableftside">
                <h1>收益统计</h1>
                <p>总收益</p>
                <p class="red">{{ $allData->allPoint ? $allData->allPoint : 0 }}点</p>
                <p>最大涨幅</p>
                <p class="red">{{ $maxData['zhangfu'] }}点</p>
                <p>单均盈利</p>
                <p class="red">{{ $allData->avaProfit }}点</p>
                <p>最大连胜</p>
                <p class="red">{{ $maxData['liansheng'] }}笔</p>
                <p>平均持仓时间</p>
                <p class="red">{{ $allData->avgChiCangTime }}时</p>
            </div>
            <br style="clear: both;">
            <div class="j_tabtitle">日报表</div>
            <div class="j_tabecharts">
                <!-- 日报表 -->
                <div id="day_chart" style="width: 100%;height: 190px;"></div>
                <h5 class="j_lasszhou">周报表</h5>
                <!-- 周报表 -->
                <div id="dayzhou_chart" style="width: 100%;height: 190px;margin: auto;"></div>
            </div>
            <div class="j_tableftside">
                <h1>收益统计</h1>
                <p>平均每日收益</p>
                <p class="red">{{$daydeal[4]}}点</p>
                <p>平均每周收益</p>
                <p class="red">{{$weekdeal[3]}}点</p>
                <p>盈利日(盈利日占比)</p>
                <p class="red">{{$daydeal[5]}}%</p>
                <p>稳定指数</p>
                <p class="red">{{ $wenDing_fengXian['wenDing'] }}</p>
            </div>
            <br style="clear: both;">
        </div>
        <!-- 交易行为 -->
        <div class="j_tabcontent">
            <div class="j_tabtitle">盈亏图</div>
            <div class="j_tabecharts">
                <div id="week_chart" style="width: 100%;height: 400px;margin: auto;padding-top: 20px;"></div>
            </div>
            <div class="j_tableftside" style="padding-top: 15px;">
                <h1 style="padding-bottom: 10px;">收益统计</h1>
                <p>最大回撤</p>
                <p class="red">{{ $maxData['huiche'] }}点</p>
                <p>最大涨幅</p>
                <p class="red">{{ $maxData['zhangfu'] }}点</p>
                <p>单均盈利</p>
                <p class="red">{{ $allData->avaProfit }}点</p>
                <p>稳定指数</p>
                <p class="red">{{ $wenDing_fengXian['wenDing'] }}</p>
                <p>风险比</p>
                <p class="red">{{ $wenDing_fengXian['fengXianBi'] }}</p>
            </div>
            <br style="clear: both;">
            <div class="j_tabtitle">
                <span>交易风格</span>
                <span>交易品种</span>
            </div>
            <div class="j_tabecharts" style="width: 90%;">
                <div class="L_jyStyle clearfix" style="padding-top: 50px;">
                    <!-- 交易风格(长短线) -->
                    <div class="L_styleAtrade clearfix">
                        <div class="L_styleChart">
                            <div id="style_chart" style="width: 100%;height: 300px;"></div>
                        </div>
                        <div class="L_tips">
                            <div>
                                <span>短线</span>
                                <span>&nbsp;&nbsp;&nbsp;持仓0-48小时</span>
                            </div>
                            <div class="L_styleNum">
                                <span class="L_white">{{ json_decode($LineAndPoint)->shortLine }}单</span>
                                <span class="L_white">&nbsp;&nbsp;&nbsp;盈利单量&nbsp;&nbsp;
                                    <span>{{json_decode($LineAndPoint)->shortProfitaNum}}</span>
                                    &nbsp;&nbsp;占<span>
                                        @if(json_decode($LineAndPoint)->shortLine !=0)
                                            {{round((json_decode($LineAndPoint)->shortProfitaNum / json_decode($LineAndPoint)->shortLine*100),2)}}
                                        @else
                                            0
                                        @endif
                                    </span>%
                                </span>
                            </div>
                            <div>
                                <span>中线</span>
                                <span>&nbsp;&nbsp;&nbsp;持仓48-120小时</span>
                            </div>
                            <div class="L_styleNum">
                                <span class="L_white">{{json_decode($LineAndPoint)->centerLine}}单</span>
                                <span class="L_white">&nbsp;&nbsp;&nbsp;盈利单量&nbsp;&nbsp;
                                    <span>{{json_decode($LineAndPoint)->centerProfitNum}}</span>
                                    &nbsp;&nbsp;占<span>
                                        @if(json_decode($LineAndPoint)->centerLine !=0)
                                            {{round((json_decode($LineAndPoint)->centerProfitNum / json_decode($LineAndPoint)->centerLine*100),2)}}
                                        @else
                                            0
                                        @endif
                                    </span>%
                                </span>
                            </div>
                            <div>
                                <span>长线</span>
                                <span>&nbsp;&nbsp;&nbsp;持仓120小时以上</span>
                            </div>
                            <div class="L_styleNum">
                                <span class="L_white">{{json_decode($LineAndPoint)->longLine}}单</span>
                                <span class="L_white">&nbsp;&nbsp;&nbsp;盈利单量&nbsp;&nbsp;
                                    <span>{{json_decode($LineAndPoint)->longProfitNum}}</span>
                                    &nbsp;&nbsp;占<span>
                                        @if(json_decode($LineAndPoint)->longLine !=0)
                                            {{round((json_decode($LineAndPoint)->longProfitNum / json_decode($LineAndPoint)->longLine*100),2)}}
                                        @else
                                            0
                                        @endif
                                    </span>%
                                </span>
                            </div>
                        </div>
                    </div>
                    <!-- 交易品种 -->
                    <div class="L_tradeVariety clearfix">
                        <div class="tradePZ">
                            <div id="trade_type" style="width: 100%;height: 400px;"></div>
                        </div>
                        <div class="tradeLB clearfix" id="tradeLB">
                            <div class="tradeLB_title">
                                <ul class="clearfix">
                                    <li>品种</li>
                                    <li>单量</li>
                                    <li>总收益</li>
                                </ul>
                            </div>
                            <div class="tradeLB_content" id="tradeLB_content">
                                <ul>
                                    @foreach($typenames as $key=>$val)
                                        <li class="clearfix">
                                            <div>{{$val->typename}}</div>
                                            <div>{{$val->num}}单</div>
                                            <div>{{$val->point ? round($val->point,2):0}}点</div>
                                        </li>
                                    @endforeach
                                    {{--<li class="clearfix">
                                        <div>EURUSD</div>
                                        <div>12单</div>
                                        <div>55点</div>
                                    </li>--}}
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <!-- <div class="j_tableftside" style="padding-top: 15px;">
                <h1 style="padding-bottom: 10px;">擅长品种</h1>
                @foreach($memadepttype as $key=>$val)
                   <p class="red">{{$val->chinaname}}</p>
                @endforeach
                
                <h1 style="padding-bottom: 10px;">交易风格</h1>
                <p class="red">擅长{{$likeLine}}交易</p>
            </div> -->
            <br style="clear: both;">
            <div class="j_tabtitle">交易时间分布</div>
            <div class="j_tabecharts">
                <div id="L_timeFBchart" style="width: 100%;height: 290px;margin: auto;"></div>
            </div>
            <div class="j_tableftside" style="padding-top: 15px;">
                <h1 style="padding-bottom: 10px;">时间分布</h1>
                <p>亚盘</p>
                <p class="red">{{ $timeDistribution['yapan'] }}单</p>
                <p>欧盘</p>
                <p class="red">{{ $timeDistribution['opan'] }}单</p>
                <p>美盘</p>
                <p class="red">{{ $timeDistribution['meipan'] }}单</p>
            </div>
            <br style="clear: both;">
            <div class="j_tabtitle">点位区间图</div>
            <div class="j_tabecharts">
                <div id="L_YSchart" style="width: 100%;height: 290px;margin: auto;"></div>
            </div>
            <div class="j_tableftside" style="padding-top: 15px;">
                <h1 style="padding-bottom: 10px;">时间分布</h1>
                <p>亚盘</p>
                <p class="red">{{ $timeDistribution['yapan'] }}单</p>
                <p>欧盘</p>
                <p class="red">{{ $timeDistribution['opan'] }}单</p>
                <p>美盘</p>
                <p class="red">{{ $timeDistribution['meipan'] }}单</p>
            </div>
            <br style="clear: both;">
        </div>
        <!-- 策略详情 -->
        <div class="j_tabcontent">
            <!-- 筛选 -->
            <div class="j_handantitle">
                <ul>
                    <li>按类型</li>
                    <li class="line"></li>
                    <li class="jylx jybjcolor" onclick="handanlist(0,0)">全部</li>
                    <li class="jylx" onclick="handanlist(1,0)">买多</li>
                    <li class="jylx" onclick="handanlist(2,0)">买空</li>
                    <li>按盈亏</li>
                    <li class="line"></li>
                    <li class="jylx" onclick="handanlist(0,1)">盈利交易</li>
                    <li class="jylx" onclick="handanlist(0,2)">亏损交易</li>
                    <li>交易品种</li>
                    <li class="sjli">
                    <select onchange="handanlist(0,0)" id="typenamechange">
                        <option value="0">全部</option>
                        @foreach($typenames as $key=>$val)
                        <option value="{{$val->typename}}">{{$val->typename}}</option>
                        @endforeach
                    </select>
                    </li>
                </ul>
            </div>

            <div class="j_handannav">
                
            </div>
        </div>
        <!-- 分析师K线图 -->
        <div class="j_tabcontent">
            <div class="j_tabecharts">
                <div id="box_echarts" style="width:100%;height:510px;"></div>
            </div>
            <div class="j_tableftside" style="padding-top: 50px;">
                <h1 style="padding-bottom: 20px;">收益统计</h1>
                <p>总盈</p>
                <p class="red">{{ $allData->allPoint ? $allData->allPoint : 0 }}点</p>
                <p>策略数量</p>
                <p class="red">{{$allData->profitTradeNum + $allData->lossTradeNum}}笔</p>
                <p>最大涨幅</p>
                <p class="red">{{ $maxData['zhangfu'] }}点</p>
                <p>单均盈利</p>
                <p class="red">{{ $allData->avaProfit }}点</p>
                <p>最大连胜</p>
                <p class="red">{{ $maxData['liansheng'] }}笔</p>
                <p>平均持仓时间</p>
                <p class="red">{{ $allData->avgChiCangTime }}时</p>
            </div>
            <br style="clear: both;">
        </div>
    </div> 
    <div class="L_tab_content" style="display: none;"> 
        <iframe name="iframeGendan" id="iframeGendan" src="{{ url('/newdingyue?analyst_id='.$userinfo->id)}}" scrolling="no" frameborder="0" width="100%" height="1250"></iframe>
    </div>
    <div class="L_tab_content" style="display: none;">
        <iframe name="iframeNewGendan" id="iframeNewGendan"src="{{url('/newgendanlist?analyst_id='.$userinfo->id)}}" scrolling="no" frameborder="0" width="100%" height="1000"></iframe>
    </div>
    <div class="L_tab_content" style="display: none;">
        @include('usercenter.newdingmaster')
    </div>
</div>
<!-- 编辑复制 -->
<div class="j_compile_copy" id="j_compile_copy" @if(count($mefollowdata) == 1) style="width:350px;" @elseif(count($mefollowdata) == 2) style="width:670px;" @elseif(count($mefollowdata) == 3) style="width:1000px;" @else style="width:350px;" @endif>
    <div class="j_x"><span id="j_X"> <img src="{{ URL::asset('/ucenter/images/fork.png') }}"/></span></div>
    <ul>
        @if($mefollowdata)
            @foreach($mefollowdata as $key=>$val)
        <li>
            <h2>{{$val->username}}</h2>
            <div>
                <span><img src="@if($val->photo) {{$val->photo}} @else {{URL::asset('/handan/images/hotren.png')}} @endif" alt=""></span>
                <span>
                    <b>{{round($val->zong_final_point,2)}}</b>
                    <p>订阅收益</p>
                </span>
            </div>
            <div>
                <p>
                    <span>{{$val->ordercount}}</span>
                    <span>{{round($val->avg_final_point,2)}}点</span>
                    <span>{{round($val->winrate,2)}}%</span>
                </p>
                <p>
                    <span>单量</span>
                    <span>单均</span>
                    <span>胜率</span>
                </p>
            </div>
            <div>
                <p>
                    <span>订阅时间</span>
                    <span>@if($val->update_time){{date("Y-m-d",$val->update_time)}}@else{{date("Y-m-d",$val->follow_time)}}@endif</span>
                </p>
                <p>
                    <span>方向</span>
                    <span>@if($val->direction == 0) 正向订阅 @else 反向订阅 @endif</span>
                </p>
            </div>
            <button onclick="topcanclefollow(this)" analyst_id="{{$val->analyst_id}}" analyst_username="{{$val->username}}" status="{{$val->status}}" direction="{{$val->direction}}">取消订阅</button>
        </li>
            @endforeach
        @else
            <div style="text-align: center;margin-top:50%;font-size:16px">您还未订阅任何分析师</div>
        @endif
    </ul>
</div>
<!-- JS引入 -->
<script type="text/javascript" src="{{ URL::asset('public_js/jquery-1.8.3.min.js') }}"></script>
<script src="{{ URL::asset('public_js/src/Highcharts-5.0.10/code/highcharts.js') }}"></script>
<script src="{{ URL::asset('public_js/src/Highcharts-5.0.10/code/highcharts-3d.js')}}"></script>
<script src="{{ URL::asset('public_js/src/Highcharts-5.0.10/code/highcharts-zh_CN.js')}}"></script>
<script src="{{ URL::asset('public_js/src/Highcharts-5.0.10/code/modules/exporting.js') }}"></script>
<script src="{{ URL::asset('public_js/src/Highcharts-5.0.10/code/highcharts-more.js') }}"></script>
<script src="{{ URL::asset('public_js/src/Highcharts-5.0.10/code/modules/solid-gauge.js') }}"></script>
<script src="{{ URL::asset('public_js/src/echarts.js') }}"></script>
<script src="{{ URL::asset('fenhome/jquery.nicescroll.min.js') }}"></script>
<script src="{{ URL::asset('js/layer/layer.js') }}"></script>
<script src="{{ URL::asset('fenhome/fenhome.js') }}"></script>
<!-- 复制协议 -->
@include('bangdan.eject')
<!-- 遮挡层 -->
<div id="mask"></div>
<!-- 申请体验账户弹窗 -->
<div id="tanCeng">
    <span></span>
    <a href='/authenticate?id=tiyan' style='cursor:pointer;color:#3b9ce0;'>
        <button onclick="perfectInfo()" style="display:none;">完善资料</button>
    </a>
</div>
<script>
    var endtime = Number('{{$userinfo->expire_time}}');
    function daojishi(){   //申请过体验账户，并且没有过期，页面刷新倒计时
        clearInterval(timer);
        var  nowtime = Date.parse(new Date());
        var leftTime = (endtime * 1000 - nowtime) / 1000;
        if(leftTime >= 0) {
            var day = Math.floor(leftTime / 60 / 60 / 24); //计算剩余的天数
            var hours = Math.floor(leftTime / 60 / 60 % 24); //计算剩余的小时
            var minutes = Math.floor(leftTime / 60 % 60);//计算剩余的分钟
            var seconds = Math.floor(leftTime % 60);//计算剩余的秒数
            msg = day+"天"+hours+"小时"+minutes+"分"+seconds+"秒";
            $('.j_time').html(msg);
            timer=setInterval("daojishi()",1000);
        }else{
            clearInterval(timer);
            $('.j_huiyuan').attr('onclick','window.location.href="{{url('/pay')}}"');
            $('.j_huiyuan').removeClass('j_huiyuan').addClass('j_chongzhi').html('充值');
        }
    }
    //编辑跟单里取消跟单
    function topcanclefollow(obj){
        var status1 =confirm('取消跟单您将收不到分析师发布的任何操作建议！');
        if(status1 == false){
            return false;
        }
        aid              = $(obj).attr('analyst_id');
        analyst_username = $(obj).attr('analyst_username');
        cancle_status           = 0;
        direction        = 0;
        $.ajax({
            url:gotofllow,
            type: 'post',
            data: {'analystid':aid,'analystname':analyst_username,'status':cancle_status,'direction':direction},
            headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') },
            dataType:'json',
            success: function(res){
                if(res.status == 0){
                    //跟单失败
                    window.location.reload();
                }else if(res.status == 2){
                    //用户未登录
                    $('.popUp').hide();
                    layer.msg('请先<a href="{{ url('/login') }}">登录</a>！');
                }else if(res.status == 3){
                    //用户未登录
                    $('.popUp').hide();
                    layer.msg('订阅分析师数量已超过限制！');
                    window.location.reload();
                }else{
                    //跟单成功
                    $('.popUp').hide();
                    layer.msg('操作成功！');
                    window.location.reload();
                }
            }
        });
    }
    // 点击按钮，关闭层
    $(".close").click(function(){
        $(document).unbind("scroll.unable");
        $('#mask').css({'display':'none'});
        $('#popUp').css({'display':'none'});
    })
    // 遮挡层
    function l_Mask(){
        var div_mask=$('#mask');
        var width=document.body.scrollWidth+'px';
        var height=document.body.scrollHeight+'px';
        div_mask.css({'width':width,'height':height,'display':'block'});
        div_mask.show();
    }
    // 显示
    function showCeng(){
        var div_mask=$('#mask');
        var width=document.body.scrollWidth+'px';
        var height=document.body.scrollHeight+'px';
        div_mask.css({'width':width,'height':height,'display':'block'});
        $('#mask').show();
        $("#tanCeng").show();
    }
    // 隐藏
    function hideCeng(){
        var div_mask=$('#mask');
        var width=document.body.scrollWidth+'px';
        var height=document.body.scrollHeight+'px';
        div_mask.css({'width':width,'height':height,'display':'block'});
        $('#mask').hide();
        $("#tanCeng").hide();
    }
    // 登录提示弹层
    function loginCeng(){
        var div_mask=$('#mask');
        var width=document.body.scrollWidth+'px';
        var height=document.body.scrollHeight+'px';
        div_mask.css({'width':width,'height':height,'display':'block'});
        $('#mask').show();
        $("#tanCeng").show();
        $("#tanCeng > span").html('您未登录,<a href="{{ url('/login') }}" style="color:#3b9ce0">请先登录!</a>');
        $("#tanCeng > button").hide();
        $("#tanCeng").css({'width':'250px','height':'80px','line-height':'80px'});
        $("#tanCeng > span").css({'margin-top':'0'});
    }
    var aid       = 0;
    var analyst_username = '';
    var status    = 3;//是否订阅
    var direction = 3;//订阅方向
    // 复制协议
    $('#btn2').click(function(){
        aid              = $(this).attr('analyst_id');
        analyst_username = $(this).attr('analyst_username');
        status           = $(this).attr('status');
        direction        = $(this).attr('direction');
        if(status == 1){
            $('#gendancancle').show();
        }else{
            $('#gendancancle').hide();
        }
        $('#j_Mask').css({'display':'block'});
        $('#popUp').css({'display':'block'})
    })
    var listurl  = '{{url("/handanhistory")}}';
    var analyst_id = '{{ $id}}';
    var zdata = '{{$LineAndPoint}}';
    // 带周的分页路径
    var weekPage = '{{ url("/ajaxorderweek") }}'
    var analyst_id = '{{ $userinfo->id}}';  // 获取到的ID
    // 收益曲线
    var xmydata11 = [];
    var xmypoint='{{ $pointDayJiaoyi }}';
    var xmytime='{{ $timeDayJiaoyi }}';
    xmytime = xmytime.split(',');
    xmypoint = xmypoint.split(',');
    xmypoint.forEach(function(data,index,arr){
        xmydata11.push(+data);
    });
    profit(profit_chart,[xmytime,xmydata11]);
    //日报表
    var DayOrders  = '';
    var Daytime    = {};
    var DayOrdersnum = [];
    var DayOrderspoint = [];
    Daytime = '{{$daydeal[0]}}';
    Daytime = Daytime.split(',');
    DayOrders = '{{$daydeal[3]}}';
    dataFn(DayOrders);
    id = DayOrders.split(';');
    id.forEach(function(data,index,arr){
        var aa = data.split(',');
        aa.forEach(function(data1,index1,arr1){
            if(index1 == 0){
                DayOrderspoint.push(+data1);
            }else{
                DayOrdersnum.push(+data1);
            }
        })
    });
    dayreport('day_chart',[DayOrderspoint,Daytime,DayOrdersnum]);
    //盈亏图
    var week_chart_width ;
    week_chart_width = $('#week_chart').width();
    var YK_finalstr  = '{{$plpointstr}}',
        YK_setProfilestr = '{{$profitpointstr}}',
        YK_setLossstr    = '{{$losspointstr}}',
        YK_timestr       = '{{$pltimestr}}',
        YK_finalData  = [],
        YK_setProfile = [],
        YK_setLoss    = [],
        YK_time       = [];

    YK_finalData  = dataFn(YK_finalstr,2);
    YK_setProfile = dataFn(YK_setProfilestr,2);
    YK_setLoss    = dataFn(YK_setLossstr,2);
    YK_time       = dataFn(YK_timestr,1);
    //交易品种饼图数据
    var datatype = "[{{$typenamestr}}]";
    datatype = datatype.replace(/&#039;/g,'"').replace(/&quot;/g,'"');
    datatype = $.parseJSON(datatype);
    //k线图
    var kfinal   = "{{$kstr}}";
    var kfinal_data = [];
    id = kfinal.split(';');
    id.forEach(function(data,index,arr){
        var point_val = data.split(',');
        var parr = [];
        if(point_val[0]){
            point_val.forEach(function (da,num,arr) {
                if(num == 0){
                    parr.push(da);
                }else{
                    parr.push(+da);
                }
            });
            kfinal_data.push(parr);
        }
    });
    kfinal_data = splitData(kfinal_data);
    //数据解析函数
    function dataFn(id,type){ // type:1-->加引号 type:2-->不加引号
        var idData = [];
        var aa = id.split(',');
        aa.forEach(function(data1,index1,arr1){
            if(type == 1){
                idData.push(data1);
            }else{
                idData.push(+data1);
            }
        });
        return idData;
    }

    //周报表
    var zhouPoint = [],
        zhouNum   = [],
        zhouTime  = [];
    
    var zhouDanLiang = '{{$weekdeal[0]}}';
    var zhouLastPoint = '{{$weekdeal[2]}}';
    var zhouTime = '{{$weekdeal[1]}}';
    //alert(zhouTime);
    zhouNum = dataFn(zhouDanLiang,2);
    zhouPoint = dataFn(zhouLastPoint,2);
    zhouTime = dataFn(zhouTime,1);
   // alert(zhouTime);
    dataday = [zhouPoint,zhouTime,zhouNum];
    dayreport('dayzhou_chart',dataday);
    //交易时间分布
    var delpointstr = '{{$delpointstr}}',
        deltimetstr = '{{$deltimetstr}}',
        delwinratestr = '{{$delwinratestr}}';
    var data7day = [delpointstr.split(','),deltimetstr.split(','),delwinratestr.split(',')];
//点位区间图
    var yingLiNum = [],
        kuiSunNum = [],
        yingKuiBiNum = [];
    var yingLiStr = '{{$pointBetweenChat[0]}}';
    var kuiSunStr = '{{$pointBetweenChat[1]}}';
    var yingKuiBiStr = '{{$pointBetweenChat[2]}}';
    
    yingLiNum = dataFn(yingLiStr,2);
    kuiSunNum = dataFn(kuiSunStr,2);
    yingKuiBiNum = dataFn(yingKuiBiStr,2);
    var dataYS = [yingLiNum,kuiSunNum,yingKuiBiNum];
</script>
</body>
</html>
